package com.platform.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;
import java.util.Map;

import com.platform.dao.MerchantBannerDao;
import com.platform.entity.MerchantBannerEntity;
import com.platform.service.MerchantBannerService;

/**
 * 商家店铺轮播图Service实现类
 *
 * @author liweihai
 * @email liweihai12345@sina.com
 * @date 2019-05-16 20:41:18
 */
@Service("merchantBannerService")
public class MerchantBannerServiceImpl implements MerchantBannerService {
    @Autowired
    private MerchantBannerDao merchantBannerDao;

    @Override
    public MerchantBannerEntity queryObject(Long id) {
        return merchantBannerDao.queryObject(id);
    }

    @Override
    public List<MerchantBannerEntity> queryList(Map<String, Object> map) {
        return merchantBannerDao.queryList(map);
    }

    @Override
    public int queryTotal(Map<String, Object> map) {
        return merchantBannerDao.queryTotal(map);
    }

    @Override
    public int save(MerchantBannerEntity merchantBanner) {
        merchantBanner.setCreateTime(new Date());
        return merchantBannerDao.save(merchantBanner);
    }

    @Override
    public int update(MerchantBannerEntity merchantBanner) {
        return merchantBannerDao.update(merchantBanner);
    }

    @Override
    public int delete(Long id) {
        return merchantBannerDao.delete(id);
    }

    @Override
    public int deleteBatch(Long[] ids) {
        return merchantBannerDao.deleteBatch(ids);
    }
}
